package com.isoftstone.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.isoftstone.entity.Diagnosis;
import com.isoftstone.entity.Register;
import com.isoftstone.service.CheckedService;

@Controller
@RequestMapping("checked")
public class checkedController {
	@Autowired
	private CheckedService checkedService;
	
	@RequestMapping("CheckList")
 public String getAllChecked(ModelMap modelMap){ 
		List<Register> list = checkedService.getAllPatientList();
		modelMap.addAttribute("list",list);
		return "docStation/CheckList";
	 }
	
	@RequestMapping("getRegisterByGuahaoId")
	@ResponseBody
	public Register getRegisterByGuahaoId(String guahao_id){
		Register register = checkedService.getRegisterByGuahaoId(guahao_id);
		return register;
	}

	@RequestMapping("getDiagnosisByZhenduanId")
	@ResponseBody
	public Diagnosis getDiagnosisByZhenduanId(String guahao_id){
		Diagnosis diagnosis = checkedService.getDiagnosisByZhenduanId(guahao_id);
		return diagnosis;
	}
}


